package com.ztgf.commodity.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.ztgf.commodity.models.dto.CommodityComboRelationDTO;
import com.ztgf.commodity.models.dto.CommoditySpecificationRelationDTO;
import com.ztgf.commodity.models.vo.CommodityComboRelationVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 商品套餐关系表映射
 *
 * @author chenyu.wang
 * @Date 2020-06-15 14:09:15
 */
@Mapper
public interface CommodityComboRelationMapper extends BaseMapper<CommodityComboRelationDTO> {

    /**
     * description: 根据商品id和套餐表id获取商品套餐价格信息
     * param: [goodsId, comboId]
     * author: chenyu.wang
     * date: 2020-06-15
     * return: com.ztgf.commodity.models.vo.CommodityComboRelationVO
     */
    CommodityComboRelationVO getByGoodsIdAndComboId(@Param("goodsId") Long goodsId, @Param("comboId") Long comboId);

    CommodityComboRelationDTO selectByCommodityAndAttrIds(@Param("comboId") Long comboId, @Param("goodsId") Long goodsId);

}
